package P1500;

import java.util.Scanner;

/**
 * @author: zhouyang
 * @descrpition:
 * @time: 2019-10-09 14:06
 */
public class P1553_数字反转 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
        scanner.close();
        invoke(input);
    }

    private static void invoke(String input) {
        int index = input.indexOf('.');//小数
        int len = input.length()-1;
        char[] chars = input.toCharArray();
        if(index != -1){
            StringBuilder sb = new StringBuilder();
            sb.append(reverse(chars,0,index-1)).append('.');
            //后缀0要去除
            index++;
            while(index <= len && chars[index] == '0') ++index;
            if(index == len+1){
                sb.append('0');
            }else{
                sb.append(reverse(chars,index,len));
            }
            System.out.println(sb.toString());
            return;
        }
        index = input.indexOf('/');//分数
        if(index != -1){
            StringBuilder sb = new StringBuilder();
            sb.append(reverse(chars,0,index-1)).append('/').append(reverse(chars,index+1,len));
            System.out.println(sb.toString());
            return;
        }
        index = input.indexOf('%');//百分数
        if(index != -1){
            StringBuilder sb = new StringBuilder();
            sb.append(reverse(chars,0,len-1)).append('%');
            System.out.println(sb.toString());
            return;
        }
        System.out.println(reverse(chars,0,len));
    }

    private static String reverse(char[] chars,int left,int right){
        while(right >= left && chars[right] == '0') --right;
        if(right < left) return "0";
        StringBuilder sb = new StringBuilder();
        while(right >= left) sb.append(chars[right--]);
        return sb.toString();
    }
}
